#pragma once

#include <string>

namespace ZeEngine
{
    class ResourceLoader;

    class Resource
    {
        friend class ResourceManager;

    public:
        Resource(const std::string& strPath, const std::string& strName, const std::string& strGroup);
        virtual ~Resource() {}

        inline bool IsLoaded()              const { return m_IsLoaded; }
        inline const std::string& GetPath() const { return m_Path; }
        inline const std::string& GetName() const { return m_Name; }
        inline const std::string& GetGroup() const { return m_Group; }

    private:
        virtual bool Load(ResourceLoader& loader)     = 0;
        virtual void Unload(ResourceLoader& loader)   = 0;
    
    protected:
        void SetLoaded (bool iIsLoaded) { m_IsLoaded = iIsLoaded; }

    private:
        std::string     m_Path;
        std::string     m_Name;
        std::string     m_Group;
        bool            m_IsLoaded;
    };
}
